Simulation 1

Data structure: \(O = (W, A, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-5 + W + 2.25A -0.5WA)]\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W                   A                Y        
##  Min.   :-3.851249   Min.   :0.0000   Min.   :0.000  
##  1st Qu.:-0.660181   1st Qu.:0.6267   1st Qu.:0.000  
##  Median :-0.004693   Median :2.0063   Median :0.000  
##  Mean   : 0.001261   Mean   :2.1367   Mean   :0.467  
##  3rd Qu.: 0.678899   3rd Qu.:3.4288   3rd Qu.:1.000  
##  Max.   : 3.492751   Max.   :5.0000   Max.   :1.000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.422   2.769   2.720   4.168   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.9032  2.2570  2.3275  3.6314  5.0000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.4132  1.7328  1.9460  3.1717  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.246   1.552   2.587   5.000

Simulation 2

Data structure: \(O = (W, A, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-10 + 2W + 5sin(A^{1.5}) + 2WA)]\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W                   A               Y         
##  Min.   :-3.967532   Min.   :0.000   Min.   :0.0000  
##  1st Qu.:-0.669179   1st Qu.:0.616   1st Qu.:0.0000  
##  Median :-0.006594   Median :1.989   Median :0.0000  
##  Mean   :-0.002222   Mean   :2.121   Mean   :0.0693  
##  3rd Qu.: 0.662488   3rd Qu.:3.407   3rd Qu.:0.0000  
##  Max.   : 3.604661   Max.   :5.000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.314   2.821   2.713   4.229   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.9032  2.2378  2.2838  3.5098  5.0000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.4145  1.7833  1.9454  3.1190  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.237   1.561   2.598   5.000

n = 200

##  The average lambda of CV-HAL: 0.0036 (= 1 * lambda_CV )
##  The average lambda of globally undersmoothed HAL: 0.0016 (= 0.3371 * lambda_CV )
##  The average lambdatime of locally undersmoothed HAL:       0.0036, 0.0035, 0.0034, 0.0034, 0.0034, 0.0034, 0.0034, 0.0034, 0.0035, 0.0034, 0.0034   (= [1, 0.9924, 0.9842, 0.9853, 0.9863, 0.9869, 0.9887, 0.9887, 0.9897, 0.9824, 0.9841] * lambda_CV
##  The average fitting time for CV-HAL: 4.9046 seconds
##  The average fitting time for globally undersmoothed HAL: 6.5215 seconds
##  The average fitting time for locally undersmoothed HAL: 19.8505 seconds

Simulation 3

Data structure: \(O = (W, A, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-10 - 3W + 4A + \mathbf{I}(A>2) * 5sin((0.8A)^2 - 2.6) )]\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W                   A               Y         
##  Min.   :-3.999772   Min.   :0.000   Min.   :0.0000  
##  1st Qu.:-0.677979   1st Qu.:0.611   1st Qu.:0.0000  
##  Median :-0.009506   Median :2.017   Median :0.0000  
##  Mean   : 0.006333   Mean   :2.125   Mean   :0.4319  
##  3rd Qu.: 0.693805   3rd Qu.:3.398   3rd Qu.:1.0000  
##  Max.   : 4.136862   Max.   :5.000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.394   2.834   2.716   4.151   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.882   2.208   2.284   3.614   5.000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.3999  1.7882  1.9479  3.1441  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.318   1.574   2.612   5.000

n = 200

##  The average lambda of CV-HAL: 0.0026 (= 1 * lambda_CV )
##  The average lambda of globally undersmoothed HAL: 0.0009 (= 0.2837 * lambda_CV )
##  The average lambdatime of locally undersmoothed HAL:       0.0024, 0.0024, 0.0024, 0.0024, 0.0025, 0.0025, 0.0025, 0.0024, 0.0025, 0.0025, 0.0026   (= [0.8706, 0.8682, 0.8726, 0.8927, 0.9219, 0.9584, 0.9378, 0.9093, 0.9588, 0.9761, 0.9854] * lambda_CV
##  The average fitting time for CV-HAL: 3.7293 seconds
##  The average fitting time for globally undersmoothed HAL: 6.0426 seconds
##  The average fitting time for locally undersmoothed HAL: 24.0037 seconds

Simulation 4

Data structure: \(O = (W_1, W_2, W_3, W_4, W_5, A, Y)\)

  • W - baseline covariates
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
  • Structural equations F and endogenous variables:
    • \(W \sim N(\mu_W, \Sigma_W)\)
    • \(A = bound(0.1W_1 + 0.2W_2 + 0.5W_3 + 0.15W_4 - 0.05W_5 - 0.01W_3W_5 + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-7 -W_1 + 2W_2 - 0.5W_4 - W_1W_3 + 4A + 0.5AW_2)]\)
      • where \(\mu_W = \begin{bmatrix}0 \\0 \\5 \\1 \\1 \\\end{bmatrix}\), and \(\Sigma_W = \begin{bmatrix}1&0.8&1.35&0.1&0.03 \\0.8&1&1.2&0.15&0.03 \\1.35&1.2&2.25&0.075&0.225 \\0.1&0.15&0.075&0.25&0.1125 \\0.03&0.03&0.225&0.1125&0.09 \\\end{bmatrix}\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W1                  W2                  W3               W4         
##  Min.   :-4.254523   Min.   :-4.697934   Min.   :-1.584   Min.   :-1.2658  
##  1st Qu.:-0.668564   1st Qu.:-0.679257   1st Qu.: 3.987   1st Qu.: 0.6482  
##  Median :-0.009893   Median :-0.010669   Median : 4.983   Median : 0.9946  
##  Mean   :-0.006976   Mean   :-0.004105   Mean   : 4.986   Mean   : 0.9964  
##  3rd Qu.: 0.654261   3rd Qu.: 0.670930   3rd Qu.: 5.987   3rd Qu.: 1.3502  
##  Max.   : 4.166622   Max.   : 4.143946   Max.   :10.572   Max.   : 2.9153  
##        W5                A               Y         
##  Min.   :-0.3376   Min.   :0.000   Min.   :0.0000  
##  1st Qu.: 0.7592   1st Qu.:1.592   1st Qu.:0.0000  
##  Median : 0.9945   Median :2.534   Median :1.0000  
##  Mean   : 0.9955   Mean   :2.543   Mean   :0.6249  
##  3rd Qu.: 1.2275   3rd Qu.:3.508   3rd Qu.:1.0000  
##  Max.   : 2.2710   Max.   :5.000   Max.   :1.0000

Simulation 5

Data structure: \(O = (W_1, W_2, W_3, W_4, W_5, A, Y)\)

  • W - baseline covariates
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
  • Structural equations F and endogenous variables:
    • \(W \sim N(\mu_W, \Sigma_W)\)
    • \(A = bound(0.1W_1 + 0.2W_2 + 0.5W_3 + 0.15W_4 - 0.05W_5 - 0.01W_3W_5 + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-10 -W_1 + 2W_2 - 0.5W_4 - 0.5W_1W_3 + 4A + \mathbf{I}(A>2) *5sin((0.8A)^2 - 2.6))]\)
      • where \(\mu_W = \begin{bmatrix}0 \\0 \\5 \\1 \\1 \\\end{bmatrix}\), and \(\Sigma_W = \begin{bmatrix}1&0.8&1.35&0.1&0.03 \\0.8&1&1.2&0.15&0.03 \\1.35&1.2&2.25&0.075&0.225 \\0.1&0.15&0.075&0.25&0.1125 \\0.03&0.03&0.225&0.1125&0.09 \\\end{bmatrix}\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W1                 W2                  W3               W4         
##  Min.   :-4.10305   Min.   :-3.992762   Min.   :-0.723   Min.   :-1.0645  
##  1st Qu.:-0.66856   1st Qu.:-0.665766   1st Qu.: 3.993   1st Qu.: 0.6574  
##  Median : 0.01409   Median : 0.004221   Median : 5.007   Median : 0.9974  
##  Mean   : 0.01345   Mean   : 0.004542   Mean   : 5.008   Mean   : 0.9924  
##  3rd Qu.: 0.68434   3rd Qu.: 0.676313   3rd Qu.: 6.014   3rd Qu.: 1.3343  
##  Max.   : 3.37515   Max.   : 4.074948   Max.   :10.222   Max.   : 2.8006  
##        W5                A               Y        
##  Min.   :-0.1632   Min.   :0.000   Min.   :0.000  
##  1st Qu.: 0.7565   1st Qu.:1.604   1st Qu.:0.000  
##  Median : 0.9909   Median :2.561   Median :0.000  
##  Mean   : 0.9929   Mean   :2.554   Mean   :0.476  
##  3rd Qu.: 1.2283   3rd Qu.:3.509   3rd Qu.:1.000  
##  Max.   : 2.2176   Max.   :5.000   Max.   :1.000

Simulation 6

Data structure: \(O = (W_1, W_2, W_3, A, Y)\)

  • W - baseline covariates
  • A - treatment level based on W, continuous between 0 and 1
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Structural equations F and endogenous variables:
    • \(W_1 \sim Uniform(o,1)\)
    • \(W_2 \sim Bernoulli(\mu=0, \sigma^2 = 2^2)\)
    • \(W_3 \sim N(W_1, 0.25*exp(2W_1))\)
    • \(A \sim Beta(v(W)\mu(W), v(W)[1-\mu(W)])\)
    • \(Y \sim Bernoulli(Q_0(A,W))\)
      • where:
      • \(v(W) = exp(1 + 2W_1expit(W3))\)
      • \(\mu(W) = expit(0.03 - 0.8log(1+W_2) + 0.9exp(W_1)W_2 - 0.4arctan(W_3+2)W_2W_1)\)
      • \(\bar{Q}_0(A,W) = expit(-2 + 1.5A + 5A^3 - 2.5W_1 + 0.5AW_2 - log(A)W_1W_2 + 0.5A^{3/4}W_1W_3)\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in (0,1])\), the causal dose-response curve

##        W1                  W2               W3                 A           
##  Min.   :0.0000212   Min.   :0.0000   Min.   :-3.20646   Min.   :0.008172  
##  1st Qu.:0.2550912   1st Qu.:0.0000   1st Qu.: 0.07964   1st Qu.:0.483313  
##  Median :0.5016742   Median :1.0000   Median : 0.80953   Median :0.661615  
##  Mean   :0.5026247   Mean   :0.6984   Mean   : 0.80890   Mean   :0.632873  
##  3rd Qu.:0.7530768   3rd Qu.:1.0000   3rd Qu.: 1.53093   3rd Qu.:0.807451  
##  Max.   :0.9999523   Max.   :1.0000   Max.   : 5.10017   Max.   :0.999333  
##        Y        
##  Min.   :0.000  
##  1st Qu.:0.000  
##  Median :0.000  
##  Mean   :0.483  
##  3rd Qu.:1.000  
##  Max.   :1.000

n = 200

##  The average lambda of CV-HAL: 0.0090 (= 1 * lambda_CV )
##  The average lambda of globally undersmoothed HAL: 0.0023 (= 0.2632 * lambda_CV )
##  The average lambdatime of locally undersmoothed HAL:       0.006, 0.0058, 0.0057, 0.0057, 0.0056, 0.0056, 0.0056, 0.0054, 0.0053, 0.0051, 0.0049, 0.0044, 0.0043, 0.0043, 0.0042, 0.0045, 0.0045   (= [0.6913, 0.676, 0.6703, 0.666, 0.6611, 0.6609, 0.6546, 0.6404, 0.6239, 0.603, 0.5776, 0.5095, 0.4942, 0.4902, 0.4755, 0.5031, 0.5107] * lambda_CV
##  The average fitting time for CV-HAL: 40.4222 seconds
##  The average fitting time for globally undersmoothed HAL: 46.4000 seconds
##  The average fitting time for locally undersmoothed HAL: 159.3079 seconds